import request from '@/config/axios'

export interface MemberUserVO {
  id: number
  no: string
  users: number
  mobile: string
  password: string
  distributors: string
  pesence: byte
  status: byte
  registerIp: string
  loginIp: string
  loginDate: Date
  sex: byte
  areaId: string
  birthday: Date
  height: string
  weight: string
  education: string
  marriage: string
  monthIncome: string
  nickname: string
  avatar: string
  name: string
  idNumber: string
  innerMonologue: string
  career: string
  nativePlace: string
  purchasHouse: byte
  purchasCar: byte
  withChild: byte
  wantChild: byte
  marryDate: string
  smoker: byte
  drink: byte
  haveMember: byte
  memberBeginTime: Date
  memberEndTime: Date
  nation: string
  constellation: string
  matchAge: string
  matchHeight: string
  matchIncome: string
  matchEducation: string
  matchMarriage: string
  matchWorkArea: string
  matchWithChild: byte
  matchWantChild: byte
  matchSmoker: byte
  matchDrink: byte
  auditStatus: byte
  auitUser: string
  auitTime: Date
  rejectReason: string
}

// 查询相亲会员用户列表
export const getMemberUserPage = async (params) => {
  return await request.get({ url: `/blind/member-user/avatarReviewList`, params })
}

// 查询相亲会员用户详情
export const getMemberUser = async (id: number) => {
  return await request.get({ url: `/blind/member-user/get?id=` + id })
}

// 新增相亲会员用户
export const createMemberUser = async (data: MemberUserVO) => {
  return await request.post({ url: `/blind/member-user/create`, data })
}

// 修改相亲会员用户
export const updateMemberUser = async (data: MemberUserVO) => {
  return await request.put({ url: `/blind/member-user/update`, data })
}
// 修改相亲会员用户头像（审核头像）
export const updateMemberUserAuditAvatar = async (data: MemberUserVO) => {
  return await request.put({ url: `/blind/member-user/auditAvatar`, data })
}

// 删除相亲会员用户
export const deleteMemberUser = async (id: number) => {
  return await request.delete({ url: `/blind/member-user/delete?id=` + id })
}

// 导出相亲会员用户 Excel
export const exportMemberUser = async (params) => {
  return await request.download({ url: `/blind/member-user/export-excel`, params })
}
